package cn.itcast.Thread;

import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

/**
 * @Author : 叶荻风
 * @create : 2024/8/14 11:16
 */
public class ReentrantLockTest {

    public static void main(String[] args) {
        Lock lock = new ReentrantLock();
        lock.lock();
        try{
            System.out.println("here do something");
        }finally {
            lock.unlock();
        }
    }
}
